<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="s" uri="/struts-tags" %>


<s:if test="product==null || editId == null">
	<s:set name="title" value="Nieuw Product Toevoegen"/>
</s:if>
<s:else>
	<s:set name="title" value="Wijzigen Product"/>
</s:else>

<html>
<head>
    <link href="<s:url value='/css/main.css'/>" rel="stylesheet" type="text/css"/>
    <style>td { white-space:nowrap; }</style>
    <title><s:property value="#title"/></title>
</head>
<body>
<div class="titleDiv"><s:text name="application.title"/></div>
<h1><s:property value="#title"/></h1>
<s:actionerror />
<s:actionmessage />
<s:form action="Productcrud!save.action">
    <s:textfield name="omschrijving" value="%{product.description}" label="%{getText('label.product.description')}" size="40"/>
    <s:select name="productType" value="%{product.ProductType}" list="types" label="%{getText('label.product.type')}"/>
    <s:select name="active" value="%{product.active}" list="states" label="%{getText('label.product.active')}"/>
    <s:hidden name="editId" value="%{product.productId}"/>
    <s:submit value="%{getText('button.label.submit')}"/>
</s:form>
<s:url action="Productindex!list" id="listurl"></s:url>
<a href="<s:property value="#listurl"/>">Terug naar Producten overzicht</a>
</body>
</html>